import request from '@/utils/request'


export function getCatalogueTree(query) {
  return request({
    url: '/knowledge/knowledgeCatalogue/getTree',
    method: 'get',
  })
}



// 查询常见质量通病目录列表
export function listKnowledgeCatalogue(query) {
  return request({
    url: '/knowledge/knowledgeCatalogue/list',
    method: 'get',
    params: query
  })
}

// 查询常见质量通病目录详细
export function getKnowledgeCatalogue(catalogueId) {
  return request({
    url: '/knowledge/knowledgeCatalogue/' + catalogueId,
    method: 'get'
  })
}

// 新增常见质量通病目录
export function addKnowledgeCatalogue(data) {
  return request({
    url: '/knowledge/knowledgeCatalogue',
    method: 'post',
    data: data
  })
}

// 修改常见质量通病目录
export function updateKnowledgeCatalogue(data) {
  return request({
    url: '/knowledge/knowledgeCatalogue',
    method: 'put',
    data: data
  })
}

// 删除常见质量通病目录
export function delKnowledgeCatalogue(catalogueId) {
  return request({
    url: '/knowledge/knowledgeCatalogue/' + catalogueId,
    method: 'delete'
  })
}
